﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  
  <xs:complexType name="Entity">
    <xs:sequence>
      <xs:element name="Fields" minOccurs="1" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Field" minOccurs="1" maxOccurs="unbounded">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="Value" type="xs:string" minOccurs="0" maxOccurs="1"/>
                </xs:sequence>
                <xs:attribute name="Name" type="xs:string" use="required"></xs:attribute>
                <xs:attribute name="DefaultValue" type="xs:string" use="optional"></xs:attribute>
                <xs:attribute name="CanRead" type="xs:boolean" use="required"></xs:attribute>
                <xs:attribute name="CanWrite" type="xs:boolean" use="required"></xs:attribute>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  
  <xs:element name="Settings">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Entities" minOccurs="1" maxOccurs="1">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Entity" type="Entity" minOccurs="1" maxOccurs="unbounded" />
            </xs:sequence>
            <xs:attribute name="Name" type="xs:string" use="required"></xs:attribute>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>